package com.woniuxy.orderassembly.util.Publisher;

import com.rabbitmq.client.Channel;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.ConnectionFactory;

import java.io.IOException;
import java.util.concurrent.TimeoutException;

public class ConnUtils {
    public static Channel connection() throws IOException, TimeoutException {
        ConnectionFactory conn = new ConnectionFactory();

        conn.setHost("localhost");
        conn.setPort(5672);

        Connection connection = conn.newConnection();

        Channel channel = connection.createChannel();

        return channel;
    }
}
